package ru.common.hibernate;

import org.hibernate.Session;

public class CompositeAction implements HibernateAction<Void> {

    private final HibernateAction<?>[] actions;

    public CompositeAction(HibernateAction<?>... actions) {
        this.actions = actions;
    }

    @Override
    public Void execute(Session session) {
        for (HibernateAction<?> a : actions) {
            a.execute(session);
        }
        return null;
    }

}
